﻿-- ================================================
-- Remarks: 
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_Subscription_GetByEmail') 
    BEGIN
        DROP  PROCEDURE  Ivy_Subscription_GetByEmail
    END
GO

CREATE PROC Ivy_Subscription_GetByEmail
-- =============================================
-- Author:		<Ram pravesh kr>
-- Create date: <27/05/2016>
-- Description:	<Ivy_Subscription_GetByEmail>
-- =============================================
-- Add the parameters for the stored procedure here
(
				@SubscribUserMailID varchar(50)
)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

    -- Insert statements for procedure here
	SELECT  [SubscribKey],
			[SubscribItemCode],
			[SubscribItemDescription],
			[SubscribUserMailID],
			[SubscrbDate],
			[Sys_DateOfCreation],
			[Sys_DateOfModification],
			[Sys_CreatedByID],
			[Sys_ModifiedByID],
			[Sys_DeleteType],
			[Sys_IsDeleted],
			[Sys_OrganizationID],
			[Sys_InitialPrimaryKeys],
			[Sys_WorkstationName]
	FROM    [Subscription]
	WHERE	
		(
			[SubscribUserMailID]=@SubscribUserMailID 
		)
END
GO
